<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>main.c</title>
<link href="tabs.css" rel="stylesheet" type="text/css" />
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="alias.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="alias.js"></script>

<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>


<script type="text/javascript">
  jQuery(document).ready(function () {
    if(gref){ // Number all _img and _table classes
      gref();
    }
  });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->

<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">nRF51822 BLE SDK
   
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('group__ble__sdk__app__hrs__eval__main.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#define-members">Defines</a> &#124;
<a href="#func-members">Functions</a> &#124;
<a href="#var-members">Variables</a>  </div>
  <div class="headertitle">
<div class="title">main.c</div>  </div>
<div class="ingroups"><a class="el" href="group__ble__sdk__app__hrs__eval.html">Heart Rate Application for Evaluation Board</a></div></div>
<div class="contents">

<p>Main file for Heart Rate Service Sample Application for nRF51822 evaluation board (PCA10001).  
<a href="#details">More...</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="define-members"></a>
Defines</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hrs__eval__main.html#ga5f5a2c9450ebc584b4fe743c6b1a280b">DEVICE_NAME</a>&#160;&#160;&#160;&quot;HRS_EVAL&quot;</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hrs__eval__main.html#gaaa2b8f5b105c3019df0cb346f472e803">MANUFACTURER_NAME</a>&#160;&#160;&#160;&quot;NordicSemiconductor&quot;</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hrs__eval__main.html#gadde0b932e57e128e4cd81c2dca47cfe3">APP_ADV_INTERVAL</a>&#160;&#160;&#160;40</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hrs__eval__main.html#gaf58371bad8e1be8e2323df60379ed2df">APP_ADV_TIMEOUT_IN_SECONDS</a>&#160;&#160;&#160;180</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hrs__eval__main.html#gaf28f0232a3fdc0eb03b94eb34b25cde8">BATTERY_LEVEL_MEAS_INTERVAL</a>&#160;&#160;&#160;2000</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hrs__eval__main.html#ga59eb06cba38be11278ebd2829e95bc26">MIN_BATTERY_LEVEL</a>&#160;&#160;&#160;81</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hrs__eval__main.html#ga16896fb7a69ca90a4a4e341d5a888002">MAX_BATTERY_LEVEL</a>&#160;&#160;&#160;100</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hrs__eval__main.html#ga69eef02165834e4dabc5757b82dddbf1">BATTERY_LEVEL_INCREMENT</a>&#160;&#160;&#160;1</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hrs__eval__main.html#ga45a3c3dc5dec56bf2ed3d1c4fdb0ccdd">HEART_RATE_MEAS_INTERVAL</a>&#160;&#160;&#160;1000</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hrs__eval__main.html#ga8806d3ee13116211450e6fb3a2fb68a4">MIN_HEART_RATE</a>&#160;&#160;&#160;60</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hrs__eval__main.html#ga5c6a36078512a923ab07d1b8276c8cca">MAX_HEART_RATE</a>&#160;&#160;&#160;100</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hrs__eval__main.html#gab604f2d2e09476706dece4ba10d23083">HEART_RATE_CHANGE</a>&#160;&#160;&#160;2</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hrs__eval__main.html#ga77ece330b6222b510f509e25282874b0">HR_INC_BUTTON_PIN_NO</a>&#160;&#160;&#160;EVAL_BOARD_BUTTON_0</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hrs__eval__main.html#ga5713bbcd7b63f0a3fa11eb22f08417ff">HR_DEC_BUTTON_PIN_NO</a>&#160;&#160;&#160;EVAL_BOARD_BUTTON_1</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hrs__eval__main.html#ga95196d5d0f40cf195a6001955d6d98cf">MIN_CONN_INTERVAL</a>&#160;&#160;&#160;((1 * 800) / 2)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hrs__eval__main.html#ga7d868ed8adb7d475b463fd8855907a18">MAX_CONN_INTERVAL</a>&#160;&#160;&#160;(1 * 800)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hrs__eval__main.html#ga0c921a874ac37870fc1516ce66cd228a">SLAVE_LATENCY</a>&#160;&#160;&#160;0</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hrs__eval__main.html#ga799412c2b531ca347e13611e6e7523b9">CONN_SUP_TIMEOUT</a>&#160;&#160;&#160;(4 * 100)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hrs__eval__main.html#ga7204f7a367e8f1ac53ef62c4ad220efc">FIRST_CONN_PARAMS_UPDATE_DELAY</a>&#160;&#160;&#160;5000</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hrs__eval__main.html#gadf85796ef07632ed27e0bce9509d9245">NEXT_CONN_PARAMS_UPDATE_DELAY</a>&#160;&#160;&#160;5000</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hrs__eval__main.html#ga34db81384bfbef23dedbef9bc6dfe46c">MAX_CONN_PARAMS_UPDATE_COUNT</a>&#160;&#160;&#160;3</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hrs__eval__main.html#ga7c1fffb0f865552108560d4c63b32db1">SEC_PARAM_TIMEOUT</a>&#160;&#160;&#160;60</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hrs__eval__main.html#gacbf03a82593c273743a5a80a1119b851">SEC_PARAM_BOND</a>&#160;&#160;&#160;1</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hrs__eval__main.html#gab6831ebe113f8afe970326b7742b5947">SEC_PARAM_MITM</a>&#160;&#160;&#160;0</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hrs__eval__main.html#ga42df85b3a4083cdc614d9111d580d98f">SEC_PARAM_IO_CAPABILITIES</a>&#160;&#160;&#160;BLE_GAP_IO_CAPS_NONE</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hrs__eval__main.html#gaee13a0d0077f423fa0edd74e17fb6b88">SEC_PARAM_OOB</a>&#160;&#160;&#160;0</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hrs__eval__main.html#ga6b7b2e2f67fbf790f55b46f8f5e24ad5">SEC_PARAM_MIN_KEY_SIZE</a>&#160;&#160;&#160;7</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hrs__eval__main.html#gaf2cd1595de153ea1d6d843619a1a7707">SEC_PARAM_MAX_KEY_SIZE</a>&#160;&#160;&#160;16</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hrs__eval__main.html#ga0dbd98cbb765458f7fd9e1b493f06414">ADC_REF_VOLTAGE_IN_MILLIVOLTS</a>&#160;&#160;&#160;1200</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hrs__eval__main.html#gaa9d35b437e029827df8e9c026d3b4ebe">ADC_PRE_SCALING_COMPENSATION</a>&#160;&#160;&#160;3</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hrs__eval__main.html#ga66573611a61405487b66c513f0662c45">DIODE_FWD_VOLT_DROP_MILLIVOLTS</a>&#160;&#160;&#160;270</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hrs__eval__main.html#ga86b4a9059f88ccc1bc39a767ab2d1dc3">TOTAL_NUMBER_OF_IO_PINS</a>&#160;&#160;&#160;32</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hrs__eval__main.html#ga80f81a2f3b5f5e1642c38bf65eeaedf1">PPI_CHAN0_TO_TOGGLE_LED</a>&#160;&#160;&#160;0</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hrs__eval__main.html#ga9bd321ef3347adb74670b3bd22ed5967">PPI_CHAN1_TO_TOGGLE_LED</a>&#160;&#160;&#160;1</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hrs__eval__main.html#ga79bf7625596d78764844d19ef2a59021">GPIOTE_CHAN_FOR_LED_TASK</a>&#160;&#160;&#160;0</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hrs__eval__main.html#gaa7914b8d7fd0bae056b85acb5062676b">TIMER_PRESCALER</a>&#160;&#160;&#160;9</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hrs__eval__main.html#gaf5c81cd7fdbb7fdce40872b70c95067b">CAPTURE_COMPARE_0_VALUE</a>&#160;&#160;&#160;0x1E84</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hrs__eval__main.html#ga8f1d7e1291660f2db78dcc504ad588ec">CAPTURE_COMPARE_1_VALUE</a>&#160;&#160;&#160;(CAPTURE_COMPARE_0_VALUE * 2)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hrs__eval__main.html#ga0552bb76e072f5519938dfdb8b9b8b03">ADC_RESULT_IN_MILLI_VOLTS</a>(ADC_VALUE)&#160;&#160;&#160;((((ADC_VALUE) * ADC_REF_VOLTAGE_IN_MILLIVOLTS) / 255) * ADC_PRE_SCALING_COMPENSATION)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Macro to convert the result of ADC conversion in millivolts.  <a href="#ga0552bb76e072f5519938dfdb8b9b8b03"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hrs__eval__main.html#gadec561788a76b8a63ad9663625a25d78">assert_nrf_callback</a> (uint16_t line_num, const uint8_t *file_name)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Assert macro callback function.  <a href="#gadec561788a76b8a63ad9663625a25d78"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hrs__eval__main.html#ga57efeb20271786f1b6db8bdb4b1d0ee4">battery_level_update</a> (const uint8_t battery_level)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Update the given Battery Level characteristic in Battery Service.  <a href="#ga57efeb20271786f1b6db8bdb4b1d0ee4"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gaa8ab696faf261604569b426bdbd6a199"></a><!-- doxytag: member="ble_sdk_app_hrs_eval_main::adc_start" ref="gaa8ab696faf261604569b426bdbd6a199" args="(void)" -->
static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hrs__eval__main.html#gaa8ab696faf261604569b426bdbd6a199">adc_start</a> (void)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Function to make the ADC start a conversion. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hrs__eval__main.html#ga7e5b3d2cf024dde83b8c536b22a1c155">battery_level_meas_timeout_handler</a> (app_timer_id_t timer_id)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Battery measurement timer timeout handler.  <a href="#ga7e5b3d2cf024dde83b8c536b22a1c155"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hrs__eval__main.html#ga5f2bc03dde9dbfbd8983fdf45085d55b">heart_rate_meas_timeout_handler</a> (app_timer_id_t timer_id)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Heart rate measurement timer timeout handler.  <a href="#ga5f2bc03dde9dbfbd8983fdf45085d55b"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga593ff34305e698e32be707e786fc2ce8"></a><!-- doxytag: member="ble_sdk_app_hrs_eval_main::adc_init" ref="ga593ff34305e698e32be707e786fc2ce8" args="()" -->
static void&#160;</td><td class="memItemRight" valign="bottom"><b>adc_init</b> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga43132496bef9b695b89b05793586aa27"></a><!-- doxytag: member="ble_sdk_app_hrs_eval_main::timer1_init" ref="ga43132496bef9b695b89b05793586aa27" args="(void)" -->
static void&#160;</td><td class="memItemRight" valign="bottom"><b>timer1_init</b> (void)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gaad16890c50156256e260b5205571ddc4"></a><!-- doxytag: member="ble_sdk_app_hrs_eval_main::ppi_init" ref="gaad16890c50156256e260b5205571ddc4" args="(void)" -->
static void&#160;</td><td class="memItemRight" valign="bottom"><b>ppi_init</b> (void)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hrs__eval__main.html#gad22626704ea5d45f863163500e355cc3">gpiote_init</a> (void)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize GPIOTE module.  <a href="#gad22626704ea5d45f863163500e355cc3"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga265c25c068555fbfae4ab4f391060040"></a><!-- doxytag: member="ble_sdk_app_hrs_eval_main::buttons_init" ref="ga265c25c068555fbfae4ab4f391060040" args="(void)" -->
static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hrs__eval__main.html#ga265c25c068555fbfae4ab4f391060040">buttons_init</a> (void)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize buttons. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hrs__eval__main.html#ga09658aaa0774820d8f25249d551bc283">timers_init</a> (void)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Timer initialization.  <a href="#ga09658aaa0774820d8f25249d551bc283"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hrs__eval__main.html#ga1004973353f351806e42896c491a5ab2">gap_params_init</a> (void)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">GAP initialization.  <a href="#ga1004973353f351806e42896c491a5ab2"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hrs__eval__main.html#ga935c9624de0709fe228dbefa4b54de48">advertising_init</a> (void)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Advertising functionality initialization.  <a href="#ga935c9624de0709fe228dbefa4b54de48"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hrs__eval__main.html#ga5b27b40e18af00d43b92f57eaed0e9b2">services_init</a> (void)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize services that will be used by the application.  <a href="#ga5b27b40e18af00d43b92f57eaed0e9b2"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga9f11118fb9ce22ad1afe20af6f89b131"></a><!-- doxytag: member="ble_sdk_app_hrs_eval_main::sec_params_init" ref="ga9f11118fb9ce22ad1afe20af6f89b131" args="(void)" -->
static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hrs__eval__main.html#ga9f11118fb9ce22ad1afe20af6f89b131">sec_params_init</a> (void)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize security parameters. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga59f2752bdf059ab72ec3987d0b1db770"></a><!-- doxytag: member="ble_sdk_app_hrs_eval_main::application_timers_start" ref="ga59f2752bdf059ab72ec3987d0b1db770" args="(void)" -->
static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hrs__eval__main.html#ga59f2752bdf059ab72ec3987d0b1db770">application_timers_start</a> (void)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Start application timers. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hrs__eval__main.html#gaa6e09b0d303b4659d4601bdcf07870dc">led_start_flashing</a> (void)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Function to start flashing the LED.  <a href="#gaa6e09b0d303b4659d4601bdcf07870dc"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hrs__eval__main.html#gacc7af227286add18ee1b0d186cad60fb">led_stop_flashing</a> (void)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Function to stop flashing the LED.  <a href="#gacc7af227286add18ee1b0d186cad60fb"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gadf80cd84ee702e57a2a416fe4f653eb8"></a><!-- doxytag: member="ble_sdk_app_hrs_eval_main::advertising_start" ref="gadf80cd84ee702e57a2a416fe4f653eb8" args="(void)" -->
static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hrs__eval__main.html#gadf80cd84ee702e57a2a416fe4f653eb8">advertising_start</a> (void)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Start advertising. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hrs__eval__main.html#ga4538ed130db3bf7fc68b76a4d9e032fa">conn_params_error_handler</a> (uint32_t nrf_error)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Connection Parameters module error handler.  <a href="#ga4538ed130db3bf7fc68b76a4d9e032fa"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gaf61b6c1c47f5c96b169ff81c345d7849"></a><!-- doxytag: member="ble_sdk_app_hrs_eval_main::conn_params_init" ref="gaf61b6c1c47f5c96b169ff81c345d7849" args="(void)" -->
static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hrs__eval__main.html#gaf61b6c1c47f5c96b169ff81c345d7849">conn_params_init</a> (void)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize the Connection Parameters module. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gaff016ad71b5161ca8ad06bf590d973d4"></a><!-- doxytag: member="ble_sdk_app_hrs_eval_main::system_off_mode_enter" ref="gaff016ad71b5161ca8ad06bf590d973d4" args="(void)" -->
static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hrs__eval__main.html#gaff016ad71b5161ca8ad06bf590d973d4">system_off_mode_enter</a> (void)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Function to put the chip in System OFF Mode. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hrs__eval__main.html#gad083cb3569230d7ecbf2d01ef2a2c1d9">on_ble_evt</a> (<a class="el" href="structble__evt__t.html">ble_evt_t</a> *p_ble_evt)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Application's BLE Stack event handler.  <a href="#gad083cb3569230d7ecbf2d01ef2a2c1d9"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hrs__eval__main.html#ga893d9dbed647c5c5d9b6b1925b15ada4">battery_level_in_percent</a> (const uint16_t mvolts)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Converts the input voltage (in milli volts) into percentage of 3.0 Volts.  <a href="#ga893d9dbed647c5c5d9b6b1925b15ada4"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hrs__eval__main.html#ga06406eadf297fa89a6eaf9586b227a69">ADC_IRQHandler</a> (void)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">ADC interrupt handler.  <a href="#ga06406eadf297fa89a6eaf9586b227a69"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hrs__eval__main.html#ga2b08d6ccb6e7f4588d2ac843d4494c0e">ble_evt_dispatch</a> (<a class="el" href="structble__evt__t.html">ble_evt_t</a> *p_ble_evt)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Dispatches a BLE stack event to all modules with a BLE stack event handler.  <a href="#ga2b08d6ccb6e7f4588d2ac843d4494c0e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hrs__eval__main.html#gaa06a7a39e83ec4cf3553f4ed6ba6323a">ble_stack_init</a> (void)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">BLE stack initialization.  <a href="#gaa06a7a39e83ec4cf3553f4ed6ba6323a"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga26b108e2296d5514a2391960b4231d71"></a><!-- doxytag: member="ble_sdk_app_hrs_eval_main::GPIOTE_IRQHandler" ref="ga26b108e2296d5514a2391960b4231d71" args="(void)" -->
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hrs__eval__main.html#ga26b108e2296d5514a2391960b4231d71">GPIOTE_IRQHandler</a> (void)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">GPIOTE interrupt handler. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hrs__eval__main.html#ga97fa4e65e4113a20dffefb8c9ffd1d08">pins_init</a> (void)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">PINs initialisation.  <a href="#ga97fa4e65e4113a20dffefb8c9ffd1d08"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga3adda2642702fdb99b08992c39494000"></a><!-- doxytag: member="ble_sdk_app_hrs_eval_main::power_manage" ref="ga3adda2642702fdb99b08992c39494000" args="(void)" -->
static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hrs__eval__main.html#ga3adda2642702fdb99b08992c39494000">power_manage</a> (void)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Power manager. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hrs__eval__main.html#gacb0906fa1cb3aeed8e86dfdb6abdd5fd">pwm_config_init</a> (void)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Function to initalise the peripherals needed for generating PWM input to flash an LED.  <a href="#gacb0906fa1cb3aeed8e86dfdb6abdd5fd"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga840291bc02cba5474a4cb46a9b9566fe"></a><!-- doxytag: member="ble_sdk_app_hrs_eval_main::main" ref="ga840291bc02cba5474a4cb46a9b9566fe" args="(void)" -->
int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hrs__eval__main.html#ga840291bc02cba5474a4cb46a9b9566fe">main</a> (void)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Application main function. <br/></td></tr>
<tr><td colspan="2"><h2><a name="var-members"></a>
Variables</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="structble__gap__sec__params__t.html">ble_gap_sec_params_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hrs__eval__main.html#ga738ed84e141ba1059dd1318dc425343c">s_sec_params</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="structble__gap__adv__params__t.html">ble_gap_adv_params_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hrs__eval__main.html#ga50483ecf69a0ae87ce1a8a5e8fa73c04">s_adv_params</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="group__ble__sdk__srv__bas.html#gaea81f98230816bcfcbfd6ccbb4db3999">ble_bas_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hrs__eval__main.html#gab22f840926bbada5a0ba32f2f7dc94b3">s_bas</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="group__ble__sdk__srv__hrs.html#gafea0cb34e3a05260b4de67d81f2f4cab">ble_hrs_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hrs__eval__main.html#ga3e49fa0f1c47f72e98bc05de96dd24d4">s_hrs</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static volatile uint16_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hrs__eval__main.html#gadae58610d8b39e6c4bf07c8dc7ae8a92">s_cur_heart_rate</a></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<p>Main file for Heart Rate Service Sample Application for nRF51822 evaluation board (PCA10001). </p>
<p>This file contains the source code for a sample application using the Heart Rate service (and also Battery and Device Information services) for the nRF51822 evaluation board. This application uses the <a class="el" href="group__ble__sdk__lib__conn__params.html">Connection Parameters Negotiation</a> module. </p>
<hr/><h2>Define Documentation</h2>
<a class="anchor" id="ga5f5a2c9450ebc584b4fe743c6b1a280b"></a><!-- doxytag: member="main.c::DEVICE_NAME" ref="ga5f5a2c9450ebc584b4fe743c6b1a280b" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define DEVICE_NAME&#160;&#160;&#160;&quot;HRS_EVAL&quot;</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Name of device. Will be included in the advertising data. </p>

<p>Definition at line <a class="el" href="pca10001_2ble_2ble__app__hrs_2main_8c_source.html#l00049">49</a> of file <a class="el" href="pca10001_2ble_2ble__app__hrs_2main_8c_source.html">main.c</a>.</p>

</div>
</div>
<a class="anchor" id="gaaa2b8f5b105c3019df0cb346f472e803"></a><!-- doxytag: member="main.c::MANUFACTURER_NAME" ref="gaaa2b8f5b105c3019df0cb346f472e803" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define MANUFACTURER_NAME&#160;&#160;&#160;&quot;NordicSemiconductor&quot;</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Manufacturer. Will be passed to Device Information Service. </p>

<p>Definition at line <a class="el" href="pca10001_2ble_2ble__app__hrs_2main_8c_source.html#l00050">50</a> of file <a class="el" href="pca10001_2ble_2ble__app__hrs_2main_8c_source.html">main.c</a>.</p>

</div>
</div>
<a class="anchor" id="gadde0b932e57e128e4cd81c2dca47cfe3"></a><!-- doxytag: member="main.c::APP_ADV_INTERVAL" ref="gadde0b932e57e128e4cd81c2dca47cfe3" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define APP_ADV_INTERVAL&#160;&#160;&#160;40</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>The advertising interval (in units of 0.625 ms. This value corresponds to 25 ms). </p>

<p>Definition at line <a class="el" href="pca10001_2ble_2ble__app__hrs_2main_8c_source.html#l00051">51</a> of file <a class="el" href="pca10001_2ble_2ble__app__hrs_2main_8c_source.html">main.c</a>.</p>

</div>
</div>
<a class="anchor" id="gaf58371bad8e1be8e2323df60379ed2df"></a><!-- doxytag: member="main.c::APP_ADV_TIMEOUT_IN_SECONDS" ref="gaf58371bad8e1be8e2323df60379ed2df" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define APP_ADV_TIMEOUT_IN_SECONDS&#160;&#160;&#160;180</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>The advertising timeout in units of seconds. </p>

<p>Definition at line <a class="el" href="pca10001_2ble_2ble__app__hrs_2main_8c_source.html#l00052">52</a> of file <a class="el" href="pca10001_2ble_2ble__app__hrs_2main_8c_source.html">main.c</a>.</p>

</div>
</div>
<a class="anchor" id="gaf28f0232a3fdc0eb03b94eb34b25cde8"></a><!-- doxytag: member="main.c::BATTERY_LEVEL_MEAS_INTERVAL" ref="gaf28f0232a3fdc0eb03b94eb34b25cde8" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define BATTERY_LEVEL_MEAS_INTERVAL&#160;&#160;&#160;2000</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Battery level measurement interval (milliseconds). </p>

<p>Definition at line <a class="el" href="pca10001_2ble_2ble__app__hrs_2main_8c_source.html#l00054">54</a> of file <a class="el" href="pca10001_2ble_2ble__app__hrs_2main_8c_source.html">main.c</a>.</p>

</div>
</div>
<a class="anchor" id="ga59eb06cba38be11278ebd2829e95bc26"></a><!-- doxytag: member="main.c::MIN_BATTERY_LEVEL" ref="ga59eb06cba38be11278ebd2829e95bc26" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define MIN_BATTERY_LEVEL&#160;&#160;&#160;81</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Minimum battery level as returned by the simulated measurement function. </p>

<p>Definition at line <a class="el" href="pca10001_2ble_2ble__app__hrs_2main_8c_source.html#l00055">55</a> of file <a class="el" href="pca10001_2ble_2ble__app__hrs_2main_8c_source.html">main.c</a>.</p>

</div>
</div>
<a class="anchor" id="ga16896fb7a69ca90a4a4e341d5a888002"></a><!-- doxytag: member="main.c::MAX_BATTERY_LEVEL" ref="ga16896fb7a69ca90a4a4e341d5a888002" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define MAX_BATTERY_LEVEL&#160;&#160;&#160;100</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Maximum battery level as returned by the simulated measurement function. </p>

<p>Definition at line <a class="el" href="pca10001_2ble_2ble__app__hrs_2main_8c_source.html#l00056">56</a> of file <a class="el" href="pca10001_2ble_2ble__app__hrs_2main_8c_source.html">main.c</a>.</p>

</div>
</div>
<a class="anchor" id="ga69eef02165834e4dabc5757b82dddbf1"></a><!-- doxytag: member="main.c::BATTERY_LEVEL_INCREMENT" ref="ga69eef02165834e4dabc5757b82dddbf1" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define BATTERY_LEVEL_INCREMENT&#160;&#160;&#160;1</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Value by which the battery level is incremented/decremented for each call to the simulated measurement function. </p>

<p>Definition at line <a class="el" href="pca10001_2ble_2ble__app__hrs_2main_8c_source.html#l00057">57</a> of file <a class="el" href="pca10001_2ble_2ble__app__hrs_2main_8c_source.html">main.c</a>.</p>

</div>
</div>
<a class="anchor" id="ga45a3c3dc5dec56bf2ed3d1c4fdb0ccdd"></a><!-- doxytag: member="main.c::HEART_RATE_MEAS_INTERVAL" ref="ga45a3c3dc5dec56bf2ed3d1c4fdb0ccdd" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define HEART_RATE_MEAS_INTERVAL&#160;&#160;&#160;1000</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Heart rate measurement interval (milliseconds). </p>

<p>Definition at line <a class="el" href="pca10001_2ble_2ble__app__hrs_2main_8c_source.html#l00059">59</a> of file <a class="el" href="pca10001_2ble_2ble__app__hrs_2main_8c_source.html">main.c</a>.</p>

</div>
</div>
<a class="anchor" id="ga8806d3ee13116211450e6fb3a2fb68a4"></a><!-- doxytag: member="main.c::MIN_HEART_RATE" ref="ga8806d3ee13116211450e6fb3a2fb68a4" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define MIN_HEART_RATE&#160;&#160;&#160;60</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Minimum heart rate as returned by the simulated measurement function. </p>

<p>Definition at line <a class="el" href="pca10001_2ble_2ble__app__hrs_2main_8c_source.html#l00060">60</a> of file <a class="el" href="pca10001_2ble_2ble__app__hrs_2main_8c_source.html">main.c</a>.</p>

</div>
</div>
<a class="anchor" id="ga5c6a36078512a923ab07d1b8276c8cca"></a><!-- doxytag: member="main.c::MAX_HEART_RATE" ref="ga5c6a36078512a923ab07d1b8276c8cca" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define MAX_HEART_RATE&#160;&#160;&#160;100</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Maximum heart rate as returned by the simulated measurement function. </p>

<p>Definition at line <a class="el" href="pca10001_2ble_2ble__app__hrs_2main_8c_source.html#l00061">61</a> of file <a class="el" href="pca10001_2ble_2ble__app__hrs_2main_8c_source.html">main.c</a>.</p>

</div>
</div>
<a class="anchor" id="gab604f2d2e09476706dece4ba10d23083"></a><!-- doxytag: member="main.c::HEART_RATE_CHANGE" ref="gab604f2d2e09476706dece4ba10d23083" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define HEART_RATE_CHANGE&#160;&#160;&#160;2</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Value by which the heart rate is incremented/decremented during button press. </p>

<p>Definition at line <a class="el" href="pca10001_2ble_2ble__app__hrs_2main_8c_source.html#l00062">62</a> of file <a class="el" href="pca10001_2ble_2ble__app__hrs_2main_8c_source.html">main.c</a>.</p>

</div>
</div>
<a class="anchor" id="ga77ece330b6222b510f509e25282874b0"></a><!-- doxytag: member="main.c::HR_INC_BUTTON_PIN_NO" ref="ga77ece330b6222b510f509e25282874b0" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define HR_INC_BUTTON_PIN_NO&#160;&#160;&#160;EVAL_BOARD_BUTTON_0</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Button used to increment heart rate. </p>

<p>Definition at line <a class="el" href="pca10001_2ble_2ble__app__hrs_2main_8c_source.html#l00064">64</a> of file <a class="el" href="pca10001_2ble_2ble__app__hrs_2main_8c_source.html">main.c</a>.</p>

</div>
</div>
<a class="anchor" id="ga5713bbcd7b63f0a3fa11eb22f08417ff"></a><!-- doxytag: member="main.c::HR_DEC_BUTTON_PIN_NO" ref="ga5713bbcd7b63f0a3fa11eb22f08417ff" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define HR_DEC_BUTTON_PIN_NO&#160;&#160;&#160;EVAL_BOARD_BUTTON_1</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Button used to decrement heart rate. </p>

<p>Definition at line <a class="el" href="pca10001_2ble_2ble__app__hrs_2main_8c_source.html#l00065">65</a> of file <a class="el" href="pca10001_2ble_2ble__app__hrs_2main_8c_source.html">main.c</a>.</p>

</div>
</div>
<a class="anchor" id="ga95196d5d0f40cf195a6001955d6d98cf"></a><!-- doxytag: member="main.c::MIN_CONN_INTERVAL" ref="ga95196d5d0f40cf195a6001955d6d98cf" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define MIN_CONN_INTERVAL&#160;&#160;&#160;((1 * 800) / 2)</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Minimum acceptable connection interval (0.5 seconds) </p>

<p>Definition at line <a class="el" href="pca10001_2ble_2ble__app__hrs_2main_8c_source.html#l00067">67</a> of file <a class="el" href="pca10001_2ble_2ble__app__hrs_2main_8c_source.html">main.c</a>.</p>

</div>
</div>
<a class="anchor" id="ga7d868ed8adb7d475b463fd8855907a18"></a><!-- doxytag: member="main.c::MAX_CONN_INTERVAL" ref="ga7d868ed8adb7d475b463fd8855907a18" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define MAX_CONN_INTERVAL&#160;&#160;&#160;(1 * 800)</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Maximum acceptable connection interval (1 second). </p>

<p>Definition at line <a class="el" href="pca10001_2ble_2ble__app__hrs_2main_8c_source.html#l00068">68</a> of file <a class="el" href="pca10001_2ble_2ble__app__hrs_2main_8c_source.html">main.c</a>.</p>

</div>
</div>
<a class="anchor" id="ga0c921a874ac37870fc1516ce66cd228a"></a><!-- doxytag: member="main.c::SLAVE_LATENCY" ref="ga0c921a874ac37870fc1516ce66cd228a" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SLAVE_LATENCY&#160;&#160;&#160;0</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Slave latency. </p>

<p>Definition at line <a class="el" href="pca10001_2ble_2ble__app__hrs_2main_8c_source.html#l00069">69</a> of file <a class="el" href="pca10001_2ble_2ble__app__hrs_2main_8c_source.html">main.c</a>.</p>

</div>
</div>
<a class="anchor" id="ga799412c2b531ca347e13611e6e7523b9"></a><!-- doxytag: member="main.c::CONN_SUP_TIMEOUT" ref="ga799412c2b531ca347e13611e6e7523b9" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define CONN_SUP_TIMEOUT&#160;&#160;&#160;(4 * 100)</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Connection supervisory timeout (4 seconds). </p>

<p>Definition at line <a class="el" href="pca10001_2ble_2ble__app__hrs_2main_8c_source.html#l00070">70</a> of file <a class="el" href="pca10001_2ble_2ble__app__hrs_2main_8c_source.html">main.c</a>.</p>

</div>
</div>
<a class="anchor" id="ga7204f7a367e8f1ac53ef62c4ad220efc"></a><!-- doxytag: member="main.c::FIRST_CONN_PARAMS_UPDATE_DELAY" ref="ga7204f7a367e8f1ac53ef62c4ad220efc" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define FIRST_CONN_PARAMS_UPDATE_DELAY&#160;&#160;&#160;5000</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Time from initiating event (connect or start of notification) to first time ble_gap_conn_param_update is called (15 seconds). </p>

<p>Definition at line <a class="el" href="pca10001_2ble_2ble__app__hrs_2main_8c_source.html#l00071">71</a> of file <a class="el" href="pca10001_2ble_2ble__app__hrs_2main_8c_source.html">main.c</a>.</p>

</div>
</div>
<a class="anchor" id="gadf85796ef07632ed27e0bce9509d9245"></a><!-- doxytag: member="main.c::NEXT_CONN_PARAMS_UPDATE_DELAY" ref="gadf85796ef07632ed27e0bce9509d9245" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define NEXT_CONN_PARAMS_UPDATE_DELAY&#160;&#160;&#160;5000</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Time between each call to ble_gap_conn_param_update after the first (5 seconds). </p>

<p>Definition at line <a class="el" href="pca10001_2ble_2ble__app__hrs_2main_8c_source.html#l00072">72</a> of file <a class="el" href="pca10001_2ble_2ble__app__hrs_2main_8c_source.html">main.c</a>.</p>

</div>
</div>
<a class="anchor" id="ga34db81384bfbef23dedbef9bc6dfe46c"></a><!-- doxytag: member="main.c::MAX_CONN_PARAMS_UPDATE_COUNT" ref="ga34db81384bfbef23dedbef9bc6dfe46c" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define MAX_CONN_PARAMS_UPDATE_COUNT&#160;&#160;&#160;3</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Number of attempts before giving up the connection parameter negotiation. </p>

<p>Definition at line <a class="el" href="pca10001_2ble_2ble__app__hrs_2main_8c_source.html#l00073">73</a> of file <a class="el" href="pca10001_2ble_2ble__app__hrs_2main_8c_source.html">main.c</a>.</p>

</div>
</div>
<a class="anchor" id="ga7c1fffb0f865552108560d4c63b32db1"></a><!-- doxytag: member="main.c::SEC_PARAM_TIMEOUT" ref="ga7c1fffb0f865552108560d4c63b32db1" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SEC_PARAM_TIMEOUT&#160;&#160;&#160;60</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Timeout for Pairing Request or Security Request (in seconds). </p>

<p>Definition at line <a class="el" href="pca10001_2ble_2ble__app__hrs_2main_8c_source.html#l00075">75</a> of file <a class="el" href="pca10001_2ble_2ble__app__hrs_2main_8c_source.html">main.c</a>.</p>

</div>
</div>
<a class="anchor" id="gacbf03a82593c273743a5a80a1119b851"></a><!-- doxytag: member="main.c::SEC_PARAM_BOND" ref="gacbf03a82593c273743a5a80a1119b851" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SEC_PARAM_BOND&#160;&#160;&#160;1</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Perform bonding. </p>

<p>Definition at line <a class="el" href="pca10001_2ble_2ble__app__hrs_2main_8c_source.html#l00076">76</a> of file <a class="el" href="pca10001_2ble_2ble__app__hrs_2main_8c_source.html">main.c</a>.</p>

</div>
</div>
<a class="anchor" id="gab6831ebe113f8afe970326b7742b5947"></a><!-- doxytag: member="main.c::SEC_PARAM_MITM" ref="gab6831ebe113f8afe970326b7742b5947" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SEC_PARAM_MITM&#160;&#160;&#160;0</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Man In The Middle protection not required. </p>

<p>Definition at line <a class="el" href="pca10001_2ble_2ble__app__hrs_2main_8c_source.html#l00077">77</a> of file <a class="el" href="pca10001_2ble_2ble__app__hrs_2main_8c_source.html">main.c</a>.</p>

</div>
</div>
<a class="anchor" id="ga42df85b3a4083cdc614d9111d580d98f"></a><!-- doxytag: member="main.c::SEC_PARAM_IO_CAPABILITIES" ref="ga42df85b3a4083cdc614d9111d580d98f" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SEC_PARAM_IO_CAPABILITIES&#160;&#160;&#160;BLE_GAP_IO_CAPS_NONE</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>No I/O capabilities. </p>

<p>Definition at line <a class="el" href="pca10001_2ble_2ble__app__hrs_2main_8c_source.html#l00078">78</a> of file <a class="el" href="pca10001_2ble_2ble__app__hrs_2main_8c_source.html">main.c</a>.</p>

</div>
</div>
<a class="anchor" id="gaee13a0d0077f423fa0edd74e17fb6b88"></a><!-- doxytag: member="main.c::SEC_PARAM_OOB" ref="gaee13a0d0077f423fa0edd74e17fb6b88" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SEC_PARAM_OOB&#160;&#160;&#160;0</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Out Of Band data not available. </p>

<p>Definition at line <a class="el" href="pca10001_2ble_2ble__app__hrs_2main_8c_source.html#l00079">79</a> of file <a class="el" href="pca10001_2ble_2ble__app__hrs_2main_8c_source.html">main.c</a>.</p>

</div>
</div>
<a class="anchor" id="ga6b7b2e2f67fbf790f55b46f8f5e24ad5"></a><!-- doxytag: member="main.c::SEC_PARAM_MIN_KEY_SIZE" ref="ga6b7b2e2f67fbf790f55b46f8f5e24ad5" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SEC_PARAM_MIN_KEY_SIZE&#160;&#160;&#160;7</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Minimum encryption key size. </p>

<p>Definition at line <a class="el" href="pca10001_2ble_2ble__app__hrs_2main_8c_source.html#l00080">80</a> of file <a class="el" href="pca10001_2ble_2ble__app__hrs_2main_8c_source.html">main.c</a>.</p>

</div>
</div>
<a class="anchor" id="gaf2cd1595de153ea1d6d843619a1a7707"></a><!-- doxytag: member="main.c::SEC_PARAM_MAX_KEY_SIZE" ref="gaf2cd1595de153ea1d6d843619a1a7707" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SEC_PARAM_MAX_KEY_SIZE&#160;&#160;&#160;16</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Maximum encryption key size. </p>

<p>Definition at line <a class="el" href="pca10001_2ble_2ble__app__hrs_2main_8c_source.html#l00081">81</a> of file <a class="el" href="pca10001_2ble_2ble__app__hrs_2main_8c_source.html">main.c</a>.</p>

</div>
</div>
<a class="anchor" id="ga0dbd98cbb765458f7fd9e1b493f06414"></a><!-- doxytag: member="main.c::ADC_REF_VOLTAGE_IN_MILLIVOLTS" ref="ga0dbd98cbb765458f7fd9e1b493f06414" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define ADC_REF_VOLTAGE_IN_MILLIVOLTS&#160;&#160;&#160;1200</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Reference voltage (in milli volts) used by ADC while doing conversion. </p>

<p>Definition at line <a class="el" href="pca10001_2ble_2ble__app__hrs_2main_8c_source.html#l00083">83</a> of file <a class="el" href="pca10001_2ble_2ble__app__hrs_2main_8c_source.html">main.c</a>.</p>

</div>
</div>
<a class="anchor" id="gaa9d35b437e029827df8e9c026d3b4ebe"></a><!-- doxytag: member="main.c::ADC_PRE_SCALING_COMPENSATION" ref="gaa9d35b437e029827df8e9c026d3b4ebe" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define ADC_PRE_SCALING_COMPENSATION&#160;&#160;&#160;3</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>The ADC is configured to use VDD with 1/3 prescaling as input. And hence the result of conversion is to be multiplied by 3 to get the actual value of the battery voltage. </p>

<p>Definition at line <a class="el" href="pca10001_2ble_2ble__app__hrs_2main_8c_source.html#l00084">84</a> of file <a class="el" href="pca10001_2ble_2ble__app__hrs_2main_8c_source.html">main.c</a>.</p>

</div>
</div>
<a class="anchor" id="ga66573611a61405487b66c513f0662c45"></a><!-- doxytag: member="main.c::DIODE_FWD_VOLT_DROP_MILLIVOLTS" ref="ga66573611a61405487b66c513f0662c45" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define DIODE_FWD_VOLT_DROP_MILLIVOLTS&#160;&#160;&#160;270</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Typical forward voltage drop of the diode (Part no: SD103ATW-7-F) that is connected in series with the voltage supply. This is the voltage drop when the forward current is 1mA. Source: Data sheet of 'SURFACE MOUNT SCHOTTKY BARRIER DIODE ARRAY' available at www.diodes.com. </p>

<p>Definition at line <a class="el" href="pca10001_2ble_2ble__app__hrs_2main_8c_source.html#l00085">85</a> of file <a class="el" href="pca10001_2ble_2ble__app__hrs_2main_8c_source.html">main.c</a>.</p>

</div>
</div>
<a class="anchor" id="ga86b4a9059f88ccc1bc39a767ab2d1dc3"></a><!-- doxytag: member="main.c::TOTAL_NUMBER_OF_IO_PINS" ref="ga86b4a9059f88ccc1bc39a767ab2d1dc3" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define TOTAL_NUMBER_OF_IO_PINS&#160;&#160;&#160;32</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Total number of Input Output Pins in the chip. </p>

<p>Definition at line <a class="el" href="pca10001_2ble_2ble__app__hrs_2main_8c_source.html#l00086">86</a> of file <a class="el" href="pca10001_2ble_2ble__app__hrs_2main_8c_source.html">main.c</a>.</p>

</div>
</div>
<a class="anchor" id="ga80f81a2f3b5f5e1642c38bf65eeaedf1"></a><!-- doxytag: member="main.c::PPI_CHAN0_TO_TOGGLE_LED" ref="ga80f81a2f3b5f5e1642c38bf65eeaedf1" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define PPI_CHAN0_TO_TOGGLE_LED&#160;&#160;&#160;0</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>The PPI Channel that connects CC0 compare event to the GPIOTE Task that toggles the Advertising LED. </p>

<p>Definition at line <a class="el" href="pca10001_2ble_2ble__app__hrs_2main_8c_source.html#l00088">88</a> of file <a class="el" href="pca10001_2ble_2ble__app__hrs_2main_8c_source.html">main.c</a>.</p>

</div>
</div>
<a class="anchor" id="ga9bd321ef3347adb74670b3bd22ed5967"></a><!-- doxytag: member="main.c::PPI_CHAN1_TO_TOGGLE_LED" ref="ga9bd321ef3347adb74670b3bd22ed5967" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define PPI_CHAN1_TO_TOGGLE_LED&#160;&#160;&#160;1</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>The PPI Channel that connects CC1 compare event to the GPIOTE Task that toggles the Advertising LED. </p>

<p>Definition at line <a class="el" href="pca10001_2ble_2ble__app__hrs_2main_8c_source.html#l00089">89</a> of file <a class="el" href="pca10001_2ble_2ble__app__hrs_2main_8c_source.html">main.c</a>.</p>

</div>
</div>
<a class="anchor" id="ga79bf7625596d78764844d19ef2a59021"></a><!-- doxytag: member="main.c::GPIOTE_CHAN_FOR_LED_TASK" ref="ga79bf7625596d78764844d19ef2a59021" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define GPIOTE_CHAN_FOR_LED_TASK&#160;&#160;&#160;0</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>The GPIOTE Channel used to perform write operation on the Advertising LED pin. </p>

<p>Definition at line <a class="el" href="pca10001_2ble_2ble__app__hrs_2main_8c_source.html#l00091">91</a> of file <a class="el" href="pca10001_2ble_2ble__app__hrs_2main_8c_source.html">main.c</a>.</p>

</div>
</div>
<a class="anchor" id="gaa7914b8d7fd0bae056b85acb5062676b"></a><!-- doxytag: member="main.c::TIMER_PRESCALER" ref="gaa7914b8d7fd0bae056b85acb5062676b" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define TIMER_PRESCALER&#160;&#160;&#160;9</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Prescaler setting for timer. </p>

<p>Definition at line <a class="el" href="pca10001_2ble_2ble__app__hrs_2main_8c_source.html#l00093">93</a> of file <a class="el" href="pca10001_2ble_2ble__app__hrs_2main_8c_source.html">main.c</a>.</p>

</div>
</div>
<a class="anchor" id="gaf5c81cd7fdbb7fdce40872b70c95067b"></a><!-- doxytag: member="main.c::CAPTURE_COMPARE_0_VALUE" ref="gaf5c81cd7fdbb7fdce40872b70c95067b" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define CAPTURE_COMPARE_0_VALUE&#160;&#160;&#160;0x1E84</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Capture compare value that corresponds to 250 ms. </p>

<p>Definition at line <a class="el" href="pca10001_2ble_2ble__app__hrs_2main_8c_source.html#l00094">94</a> of file <a class="el" href="pca10001_2ble_2ble__app__hrs_2main_8c_source.html">main.c</a>.</p>

</div>
</div>
<a class="anchor" id="ga8f1d7e1291660f2db78dcc504ad588ec"></a><!-- doxytag: member="main.c::CAPTURE_COMPARE_1_VALUE" ref="ga8f1d7e1291660f2db78dcc504ad588ec" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define CAPTURE_COMPARE_1_VALUE&#160;&#160;&#160;(CAPTURE_COMPARE_0_VALUE * 2)</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Capture compare value that corresponds to 500 ms. </p>

<p>Definition at line <a class="el" href="pca10001_2ble_2ble__app__hrs_2main_8c_source.html#l00095">95</a> of file <a class="el" href="pca10001_2ble_2ble__app__hrs_2main_8c_source.html">main.c</a>.</p>

</div>
</div>
<a class="anchor" id="ga0552bb76e072f5519938dfdb8b9b8b03"></a><!-- doxytag: member="main.c::ADC_RESULT_IN_MILLI_VOLTS" ref="ga0552bb76e072f5519938dfdb8b9b8b03" args="(ADC_VALUE)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define ADC_RESULT_IN_MILLI_VOLTS</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">ADC_VALUE</td><td>)</td>
          <td>&#160;&#160;&#160;((((ADC_VALUE) * ADC_REF_VOLTAGE_IN_MILLIVOLTS) / 255) * ADC_PRE_SCALING_COMPENSATION)</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Macro to convert the result of ADC conversion in millivolts. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">ADC_VALUE</td><td>ADC result. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Result converted to millivolts. </dd></dl>

<p>Definition at line <a class="el" href="pca10001_2ble_2ble__app__hrs_2main_8c_source.html#l00109">109</a> of file <a class="el" href="pca10001_2ble_2ble__app__hrs_2main_8c_source.html">main.c</a>.</p>

</div>
</div>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="gadec561788a76b8a63ad9663625a25d78"></a><!-- doxytag: member="main.c::assert_nrf_callback" ref="gadec561788a76b8a63ad9663625a25d78" args="(uint16_t line_num, const uint8_t *file_name)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void assert_nrf_callback </td>
          <td>(</td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>line_num</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint8_t *&#160;</td>
          <td class="paramname"><em>file_name</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Assert macro callback function. </p>
<p>This function will be called if the ASSERT macro fails.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">line_num</td><td>Line number of the failing ASSERT call. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">file_name</td><td>File name of the failing ASSERT call. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="pca10001_2ble_2ble__app__hrs_2main_8c_source.html#l00120">120</a> of file <a class="el" href="pca10001_2ble_2ble__app__hrs_2main_8c_source.html">main.c</a>.</p>

</div>
</div>
<a class="anchor" id="ga57efeb20271786f1b6db8bdb4b1d0ee4"></a><!-- doxytag: member="main.c::battery_level_update" ref="ga57efeb20271786f1b6db8bdb4b1d0ee4" args="(const uint8_t battery_level)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static void battery_level_update </td>
          <td>(</td>
          <td class="paramtype">const uint8_t&#160;</td>
          <td class="paramname"><em>battery_level</em></td><td>)</td>
          <td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Update the given Battery Level characteristic in Battery Service. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">battery_level</td><td>The battery level in percentage </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="pca10001_2ble_2ble__app__hrs_2main_8c_source.html#l00141">141</a> of file <a class="el" href="pca10001_2ble_2ble__app__hrs_2main_8c_source.html">main.c</a>.</p>

</div>
</div>
<a class="anchor" id="ga7e5b3d2cf024dde83b8c536b22a1c155"></a><!-- doxytag: member="main.c::battery_level_meas_timeout_handler" ref="ga7e5b3d2cf024dde83b8c536b22a1c155" args="(app_timer_id_t timer_id)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static void battery_level_meas_timeout_handler </td>
          <td>(</td>
          <td class="paramtype">app_timer_id_t&#160;</td>
          <td class="paramname"><em>timer_id</em></td><td>)</td>
          <td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Battery measurement timer timeout handler. </p>
<p>This function will be called each time the battery level measurement timer expires. This function will start the ADC.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">timer_id</td><td>Id of timer that has expired. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="pca10001_2ble_2ble__app__hrs_2main_8c_source.html#l00177">177</a> of file <a class="el" href="pca10001_2ble_2ble__app__hrs_2main_8c_source.html">main.c</a>.</p>

</div>
</div>
<a class="anchor" id="ga5f2bc03dde9dbfbd8983fdf45085d55b"></a><!-- doxytag: member="main.c::heart_rate_meas_timeout_handler" ref="ga5f2bc03dde9dbfbd8983fdf45085d55b" args="(app_timer_id_t timer_id)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static void heart_rate_meas_timeout_handler </td>
          <td>(</td>
          <td class="paramtype">app_timer_id_t&#160;</td>
          <td class="paramname"><em>timer_id</em></td><td>)</td>
          <td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Heart rate measurement timer timeout handler. </p>
<p>This function will be called each time the heart rate measurement timer expires. It will exclude RR Interval data from every third measurement.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">timer_id</td><td>Id of timer that has expired. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="pca10001_2ble_2ble__app__hrs_2main_8c_source.html#l00191">191</a> of file <a class="el" href="pca10001_2ble_2ble__app__hrs_2main_8c_source.html">main.c</a>.</p>

</div>
</div>
<a class="anchor" id="gad22626704ea5d45f863163500e355cc3"></a><!-- doxytag: member="main.c::gpiote_init" ref="gad22626704ea5d45f863163500e355cc3" args="(void)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static void gpiote_init </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Initialize GPIOTE module. </p>
<p>This will power up the GPIOTE module and initialise it to receive button presses as PORT event. </p>

<p>Definition at line <a class="el" href="pca10001_2ble_2ble__app__hrs_2main_8c_source.html#l00363">363</a> of file <a class="el" href="pca10001_2ble_2ble__app__hrs_2main_8c_source.html">main.c</a>.</p>

</div>
</div>
<a class="anchor" id="ga09658aaa0774820d8f25249d551bc283"></a><!-- doxytag: member="main.c::timers_init" ref="ga09658aaa0774820d8f25249d551bc283" args="(void)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static void timers_init </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Timer initialization. </p>
<p>Initializes the timer module. This creates and starts application timers. </p>

<p>Definition at line <a class="el" href="pca10001_2ble_2ble__app__hrs_2main_8c_source.html#l00437">437</a> of file <a class="el" href="pca10001_2ble_2ble__app__hrs_2main_8c_source.html">main.c</a>.</p>

</div>
</div>
<a class="anchor" id="ga1004973353f351806e42896c491a5ab2"></a><!-- doxytag: member="main.c::gap_params_init" ref="ga1004973353f351806e42896c491a5ab2" args="(void)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static void gap_params_init </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>GAP initialization. </p>
<p>This function shall be used to setup all the necessary GAP (Generic Access Profile) parameters of the device. It also sets the permissions and appearance. </p>

<p>Definition at line <a class="el" href="pca10001_2ble_2ble__app__hrs_2main_8c_source.html#l00455">455</a> of file <a class="el" href="pca10001_2ble_2ble__app__hrs_2main_8c_source.html">main.c</a>.</p>

</div>
</div>
<a class="anchor" id="ga935c9624de0709fe228dbefa4b54de48"></a><!-- doxytag: member="main.c::advertising_init" ref="ga935c9624de0709fe228dbefa4b54de48" args="(void)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static void advertising_init </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Advertising functionality initialization. </p>
<p>Encodes the required advertising data and passes it to the stack. Also builds a structure to be passed to the stack when starting advertising. </p>

<p>Definition at line <a class="el" href="pca10001_2ble_2ble__app__hrs_2main_8c_source.html#l00495">495</a> of file <a class="el" href="pca10001_2ble_2ble__app__hrs_2main_8c_source.html">main.c</a>.</p>

</div>
</div>
<a class="anchor" id="ga5b27b40e18af00d43b92f57eaed0e9b2"></a><!-- doxytag: member="main.c::services_init" ref="ga5b27b40e18af00d43b92f57eaed0e9b2" args="(void)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static void services_init </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Initialize services that will be used by the application. </p>
<p>Initialize the Heart Rate, Battery and Device Information services. </p>

<p>Definition at line <a class="el" href="pca10001_2ble_2ble__app__hrs_2main_8c_source.html#l00539">539</a> of file <a class="el" href="pca10001_2ble_2ble__app__hrs_2main_8c_source.html">main.c</a>.</p>

</div>
</div>
<a class="anchor" id="gaa6e09b0d303b4659d4601bdcf07870dc"></a><!-- doxytag: member="main.c::led_start_flashing" ref="gaa6e09b0d303b4659d4601bdcf07870dc" args="(void)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static void led_start_flashing </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Function to start flashing the LED. </p>
<p>This will start the TIMER1 and enable the GPIOTE task that toggles the LED. The PPI and GPIOTE configurations done by this app will make this action result in the flashing of the LED. </p>

<p>Definition at line <a class="el" href="pca10001_2ble_2ble__app__hrs_2main_8c_source.html#l00653">653</a> of file <a class="el" href="pca10001_2ble_2ble__app__hrs_2main_8c_source.html">main.c</a>.</p>

</div>
</div>
<a class="anchor" id="gacc7af227286add18ee1b0d186cad60fb"></a><!-- doxytag: member="main.c::led_stop_flashing" ref="gacc7af227286add18ee1b0d186cad60fb" args="(void)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static void led_stop_flashing </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Function to stop flashing the LED. </p>
<p>This will stop the TIMER1 and disable the GPIOTE task that toggles the LED. The PPI and GPIOTE configurations done by this app will make this action result in the turning off the LED. </p>

<p>Definition at line <a class="el" href="pca10001_2ble_2ble__app__hrs_2main_8c_source.html#l00670">670</a> of file <a class="el" href="pca10001_2ble_2ble__app__hrs_2main_8c_source.html">main.c</a>.</p>

</div>
</div>
<a class="anchor" id="ga4538ed130db3bf7fc68b76a4d9e032fa"></a><!-- doxytag: member="main.c::conn_params_error_handler" ref="ga4538ed130db3bf7fc68b76a4d9e032fa" args="(uint32_t nrf_error)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static void conn_params_error_handler </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>nrf_error</em></td><td>)</td>
          <td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Connection Parameters module error handler. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">nrf_error</td><td>Error code containing information about what went wrong. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="pca10001_2ble_2ble__app__hrs_2main_8c_source.html#l00704">704</a> of file <a class="el" href="pca10001_2ble_2ble__app__hrs_2main_8c_source.html">main.c</a>.</p>

</div>
</div>
<a class="anchor" id="gad083cb3569230d7ecbf2d01ef2a2c1d9"></a><!-- doxytag: member="main.c::on_ble_evt" ref="gad083cb3569230d7ecbf2d01ef2a2c1d9" args="(ble_evt_t *p_ble_evt)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static void on_ble_evt </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structble__evt__t.html">ble_evt_t</a> *&#160;</td>
          <td class="paramname"><em>p_ble_evt</em></td><td>)</td>
          <td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Application's BLE Stack event handler. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">p_ble_evt</td><td>Bluetooth stack event. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="pca10001_2ble_2ble__app__hrs_2main_8c_source.html#l00752">752</a> of file <a class="el" href="pca10001_2ble_2ble__app__hrs_2main_8c_source.html">main.c</a>.</p>

</div>
</div>
<a class="anchor" id="ga893d9dbed647c5c5d9b6b1925b15ada4"></a><!-- doxytag: member="main.c::battery_level_in_percent" ref="ga893d9dbed647c5c5d9b6b1925b15ada4" args="(const uint16_t mvolts)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static uint8_t battery_level_in_percent </td>
          <td>(</td>
          <td class="paramtype">const uint16_t&#160;</td>
          <td class="paramname"><em>mvolts</em></td><td>)</td>
          <td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Converts the input voltage (in milli volts) into percentage of 3.0 Volts. </p>
<p>The calculation is based on a linearized version of the battery's discharge curve. 3.0V returns 100% battery level. The limit for power failure is 2.1V and is considered to be the lower boundary.</p>
<p>The discharge curve for CR2032 is non-linear. In this model it is split into 4 linear sections:</p>
<ul>
<li>Section 1: 3.0V - 2.9V = 100% - 42% (58% drop on 100 mV)</li>
<li>Section 2: 2.9V - 2.74V = 42% - 18% (24% drop on 160 mV)</li>
<li>Section 3: 2.74V - 2.44V = 18% - 6% (12% drop on 300 mV)</li>
<li>Section 4: 2.44V - 2.1V = 6% - 0% (6% drop on 340 mV)</li>
</ul>
<p>These numbers are by no means accurate. Temperature and load in the actual application is not accounted for!</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">mvolts</td><td>The voltage in mV</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Battery level in percent. </dd></dl>

<p>Definition at line <a class="el" href="pca10001_2ble_2ble__app__hrs_2main_8c_source.html#l00847">847</a> of file <a class="el" href="pca10001_2ble_2ble__app__hrs_2main_8c_source.html">main.c</a>.</p>

</div>
</div>
<a class="anchor" id="ga06406eadf297fa89a6eaf9586b227a69"></a><!-- doxytag: member="main.c::ADC_IRQHandler" ref="ga06406eadf297fa89a6eaf9586b227a69" args="(void)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ADC_IRQHandler </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>ADC interrupt handler. </p>
<p>This function will fetch the conversion result from the ADC, convert the value into percentage and send it to peer. </p>

<p>Definition at line <a class="el" href="pca10001_2ble_2ble__app__hrs_2main_8c_source.html#l00884">884</a> of file <a class="el" href="pca10001_2ble_2ble__app__hrs_2main_8c_source.html">main.c</a>.</p>

</div>
</div>
<a class="anchor" id="ga2b08d6ccb6e7f4588d2ac843d4494c0e"></a><!-- doxytag: member="main.c::ble_evt_dispatch" ref="ga2b08d6ccb6e7f4588d2ac843d4494c0e" args="(ble_evt_t *p_ble_evt)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static void ble_evt_dispatch </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structble__evt__t.html">ble_evt_t</a> *&#160;</td>
          <td class="paramname"><em>p_ble_evt</em></td><td>)</td>
          <td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Dispatches a BLE stack event to all modules with a BLE stack event handler. </p>
<p>This function is called from the BLE Stack event interrupt handler after a BLE stack event has been received.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">p_ble_evt</td><td>Bluetooth stack event. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="pca10001_2ble_2ble__app__hrs_2main_8c_source.html#l00910">910</a> of file <a class="el" href="pca10001_2ble_2ble__app__hrs_2main_8c_source.html">main.c</a>.</p>

</div>
</div>
<a class="anchor" id="gaa06a7a39e83ec4cf3553f4ed6ba6323a"></a><!-- doxytag: member="main.c::ble_stack_init" ref="gaa06a7a39e83ec4cf3553f4ed6ba6323a" args="(void)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static void ble_stack_init </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>BLE stack initialization. </p>
<p>Initializes the SoftDevice and the BLE event interrupt. </p>

<p>Definition at line <a class="el" href="pca10001_2ble_2ble__app__hrs_2main_8c_source.html#l00924">924</a> of file <a class="el" href="pca10001_2ble_2ble__app__hrs_2main_8c_source.html">main.c</a>.</p>

</div>
</div>
<a class="anchor" id="ga97fa4e65e4113a20dffefb8c9ffd1d08"></a><!-- doxytag: member="main.c::pins_init" ref="ga97fa4e65e4113a20dffefb8c9ffd1d08" args="(void)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static void pins_init </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>PINs initialisation. </p>
<p>This function will make all the 32 pins of the chip to disconnect input buffer. This is used to prevent floating pins which result in unwanted current consumption. This function should be called BEFORE configuring buttons and LEDs. </p>

<p>Definition at line <a class="el" href="pca10001_2ble_2ble__app__hrs_2main_8c_source.html#l00974">974</a> of file <a class="el" href="pca10001_2ble_2ble__app__hrs_2main_8c_source.html">main.c</a>.</p>

</div>
</div>
<a class="anchor" id="gacb0906fa1cb3aeed8e86dfdb6abdd5fd"></a><!-- doxytag: member="main.c::pwm_config_init" ref="gacb0906fa1cb3aeed8e86dfdb6abdd5fd" args="(void)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static void pwm_config_init </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Function to initalise the peripherals needed for generating PWM input to flash an LED. </p>
<p>This function initialises the GPIOTE, TIMER1 and PPI channels to generate PWM input to the advertising LED. </p>

<p>Definition at line <a class="el" href="pca10001_2ble_2ble__app__hrs_2main_8c_source.html#l01003">1003</a> of file <a class="el" href="pca10001_2ble_2ble__app__hrs_2main_8c_source.html">main.c</a>.</p>

</div>
</div>
<hr/><h2>Variable Documentation</h2>
<a class="anchor" id="ga738ed84e141ba1059dd1318dc425343c"></a><!-- doxytag: member="main.c::s_sec_params" ref="ga738ed84e141ba1059dd1318dc425343c" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structble__gap__sec__params__t.html">ble_gap_sec_params_t</a> <a class="el" href="group__ble__sdk__app__hrs__eval__main.html#ga738ed84e141ba1059dd1318dc425343c">s_sec_params</a><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Security requirements for this application. </p>

<p>Definition at line <a class="el" href="pca10001_2ble_2ble__app__hrs_2main_8c_source.html#l00097">97</a> of file <a class="el" href="pca10001_2ble_2ble__app__hrs_2main_8c_source.html">main.c</a>.</p>

</div>
</div>
<a class="anchor" id="ga50483ecf69a0ae87ce1a8a5e8fa73c04"></a><!-- doxytag: member="main.c::s_adv_params" ref="ga50483ecf69a0ae87ce1a8a5e8fa73c04" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structble__gap__adv__params__t.html">ble_gap_adv_params_t</a> <a class="el" href="group__ble__sdk__app__hrs__eval__main.html#ga50483ecf69a0ae87ce1a8a5e8fa73c04">s_adv_params</a><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Parameters to be passed to the stack when starting advertising. </p>

<p>Definition at line <a class="el" href="pca10001_2ble_2ble__app__hrs_2main_8c_source.html#l00098">98</a> of file <a class="el" href="pca10001_2ble_2ble__app__hrs_2main_8c_source.html">main.c</a>.</p>

</div>
</div>
<a class="anchor" id="gab22f840926bbada5a0ba32f2f7dc94b3"></a><!-- doxytag: member="main.c::s_bas" ref="gab22f840926bbada5a0ba32f2f7dc94b3" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__ble__sdk__srv__bas.html#gaea81f98230816bcfcbfd6ccbb4db3999">ble_bas_t</a> <a class="el" href="group__ble__sdk__app__hrs__eval__main.html#gab22f840926bbada5a0ba32f2f7dc94b3">s_bas</a><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Structure used to identify the battery service. </p>

<p>Definition at line <a class="el" href="pca10001_2ble_2ble__app__hrs_2main_8c_source.html#l00099">99</a> of file <a class="el" href="pca10001_2ble_2ble__app__hrs_2main_8c_source.html">main.c</a>.</p>

</div>
</div>
<a class="anchor" id="ga3e49fa0f1c47f72e98bc05de96dd24d4"></a><!-- doxytag: member="main.c::s_hrs" ref="ga3e49fa0f1c47f72e98bc05de96dd24d4" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__ble__sdk__srv__hrs.html#gafea0cb34e3a05260b4de67d81f2f4cab">ble_hrs_t</a> <a class="el" href="group__ble__sdk__app__hrs__eval__main.html#ga3e49fa0f1c47f72e98bc05de96dd24d4">s_hrs</a><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Structure used to identify the heart rate service. </p>

<p>Definition at line <a class="el" href="pca10001_2ble_2ble__app__hrs_2main_8c_source.html#l00100">100</a> of file <a class="el" href="pca10001_2ble_2ble__app__hrs_2main_8c_source.html">main.c</a>.</p>

</div>
</div>
<a class="anchor" id="gadae58610d8b39e6c4bf07c8dc7ae8a92"></a><!-- doxytag: member="main.c::s_cur_heart_rate" ref="gadae58610d8b39e6c4bf07c8dc7ae8a92" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">volatile uint16_t <a class="el" href="group__ble__sdk__app__hrs__eval__main.html#gadae58610d8b39e6c4bf07c8dc7ae8a92">s_cur_heart_rate</a><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Current heart rate value. </p>

<p>Definition at line <a class="el" href="pca10001_2ble_2ble__app__hrs_2main_8c_source.html#l00101">101</a> of file <a class="el" href="pca10001_2ble_2ble__app__hrs_2main_8c_source.html">main.c</a>.</p>

</div>
</div>
</div>
</div>
  <div id="nav-path" class="navpath">
    <ul>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Defines</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>


    <li class="footer">
      Copyright &copy 2006-2011 <a href="http://www.nordicsemi.no" style="text-decoration:none">Nordic Semiconductor</a>.
      All Rights Reserved.
      <a href="disclaimer.html">Disclaimer</a>
    </li>
   </ul>
 </div>


</body>
</html>
